  /**
   * Generate time : 2013-10-16 8:58:57
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.cb.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZMCBProcess 
 * table comment : 工序定义 
 */
public class ZMCBProcess extends DaoEPBase {

	private String fdKeyId = " ";		/* FD_KEY_ID*/
	private String fdNo = " ";		/* 编号*/
	private String fdProcessName = " ";		/* 工序*/
	private Float fdDuration = new Float(0);	/* 默认工期*/	
	private String fdRemarks = " ";		/* 描述*/
	private String fdLeaf = " ";		/* 是否子节点*/
	private String fdParents = " ";		/* 父节点序号*/
	private String fdUse = " ";		/* 是否使用*/

	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("fdKeyId");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("FD_KEY_ID");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdNo");
	eiColumn.setFieldLength(10);	
	eiColumn.setDescName("编号");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdProcessName");
	eiColumn.setFieldLength(60);	
	eiColumn.setDescName("工序");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdDuration");
	eiColumn.setType("N");
	eiColumn.setScaleLength(1);
	eiColumn.setFieldLength(4);
	eiColumn.setDescName("默认工期");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdRemarks");
	eiColumn.setFieldLength(500);	
	eiColumn.setDescName("描述");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdLeaf");
	eiColumn.setFieldLength(2);	
	eiColumn.setDescName("是否子节点");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdParents");
	eiColumn.setFieldLength(10);	
	eiColumn.setDescName("父节点序号");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdUse");
	eiColumn.setFieldLength(2);	
	eiColumn.setDescName("是否使用");
	eiMetadata.addMeta(eiColumn);
	

	}
	/**
	 * the constructor
	 */
	public ZMCBProcess() {
		initMetaData();
	}
	
	/**
	 * get the fdKeyId - FD_KEY_ID
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}
	
	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	
	/**
	 * get the fdNo - 编号
	 * @return the fdNo
	 */
	public String getFdNo() {
		return this.fdNo;
	}
	
	/**
	 * set the fdNo - 编号
	 */
	public void setFdNo(String fdNo) {
		this.fdNo = fdNo;
	}
	
	/**
	 * get the fdProcessName - 工序
	 * @return the fdProcessName
	 */
	public String getFdProcessName() {
		return this.fdProcessName;
	}
	
	/**
	 * set the fdProcessName - 工序
	 */
	public void setFdProcessName(String fdProcessName) {
		this.fdProcessName = fdProcessName;
	}
	
	/**
	 * get the fdDuration - 默认工期
	 * @return the fdDuration
	 */
	public Float getFdDuration() {
		return this.fdDuration;
	}
	
	/**
	 * set the fdDuration - 默认工期
	 */
	public void setFdDuration(Float fdDuration) {
		this.fdDuration = fdDuration;
	}
	
	/**
	 * get the fdRemarks - 描述
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}
	
	/**
	 * set the fdRemarks - 描述
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}
	
	/**
	 * get the fdLeaf - 是否子节点
	 * @return the fdLeaf
	 */
	public String getFdLeaf() {
		return this.fdLeaf;
	}
	
	/**
	 * set the fdLeaf - 是否子节点
	 */
	public void setFdLeaf(String fdLeaf) {
		this.fdLeaf = fdLeaf;
	}
	
	/**
	 * get the fdParents - 父节点序号
	 * @return the fdParents
	 */
	public String getFdParents() {
		return this.fdParents;
	}
	
	/**
	 * set the fdParents - 父节点序号
	 */
	public void setFdParents(String fdParents) {
		this.fdParents = fdParents;
	}
	
	/**
	 * get the fdUse - 是否使用
	 * @return the fdUse
	 */
	public String getFdUse() {
		return this.fdUse;
	}
	
	/**
	 * set the fdUse - 是否使用
	 */
	public void setFdUse(String fdUse) {
		this.fdUse = fdUse;
	}
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNo")), fdNo));
		setFdProcessName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProcessName")), fdProcessName));
		setFdDuration(NumberUtils.toFloat(StringUtils.toString(map.get("fdDuration")), fdDuration));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
		setFdLeaf(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdLeaf")), fdLeaf));
		setFdParents(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParents")), fdParents));
		setFdUse(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdUse")), fdUse));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
			map.put("fdNo",StringUtils.toString(fdNo, eiMetadata.getMeta("fdNo")));	
			map.put("fdProcessName",StringUtils.toString(fdProcessName, eiMetadata.getMeta("fdProcessName")));	
			map.put("fdDuration",StringUtils.toString(fdDuration, eiMetadata.getMeta("fdDuration")));	
			map.put("fdRemarks",StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));	
			map.put("fdLeaf",StringUtils.toString(fdLeaf, eiMetadata.getMeta("fdLeaf")));	
			map.put("fdParents",StringUtils.toString(fdParents, eiMetadata.getMeta("fdParents")));	
			map.put("fdUse",StringUtils.toString(fdUse, eiMetadata.getMeta("fdUse")));	
			
		return map;
	
	}
}